package com.chinatechstar.prediction.mapper;

import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.chinatechstar.prediction.dto.PredictionOptimizationDTO;
import com.chinatechstar.prediction.entity.PredictionOptimization;

/**
 * 数据持久接口层
 */
public interface PredictionOptimizationMapper {

	/**
	 * 查询所有数据
	 *
	 * @return List<PredictionOptimization>
	 */
	List<PredictionOptimization> findPredictionOptimizationAll();

	/**
	 * 查询分页或导出数据
	 *
	 * @param paramMap 参数Map
	 * @return List<LinkedHashMap<String, Object>>
	 */
	List<LinkedHashMap<String, Object>> findPredictionOptimizationByCondition(Map<String, Object> paramMap);

	/**
	 * 根据主键ID数据查询数据
	 *
	 * @param id ID
	 * @return PredictionOptimization
	 */
	PredictionOptimization findPredictionOptimizationById(Long id);

	/**
	 * 根据主键数组数据查询数据
	 *
	 * @param ids ID数组
	 * @return List<PredictionOptimization>
	 */
	List<PredictionOptimization> findPredictionOptimizationByIds(Long[] ids);

	/**
	 * 根据压力和温度查询CO2密度
	 *
	 * @param formationPressure 压力
	 * @param formationTemperature 温度
	 *
	 */
	List<PredictionOptimizationDTO> findWellCo2Density(Double formationPressure, Double formationTemperature);


	/**
	 * 新增
	 *
	 * @param predictionOptimization 实体
	 * @return int
	 */
	int insertPredictionOptimization(PredictionOptimization predictionOptimization);

	/**
	 * 批量新增
	 *
	 * @param predictionOptimizations 实体数组
	 * @return int
	 */
	int insertPredictionOptimizations(List<PredictionOptimization> predictionOptimizations);

	/**
	 * 编辑
	 *
	 * @param predictionOptimization 实体
	 * @return int
	 */
	int updatePredictionOptimization(PredictionOptimization predictionOptimization);

	/**
	 * 批量编辑
	 *
	 * @param predictionOptimizations 实体数组
	 * @return int
	 */
	int updatePredictionOptimizations(List<PredictionOptimization> predictionOptimizations);

	/**
	 * 删除
	 *
	 * @param id ID
	 * @return int
	 */
	int deletePredictionOptimizationById(Long id);

	/**
	 * 批量删除
	 *
	 * @param ids ID数组
	 * @return int
	 */
	int deletePredictionOptimizationByIds(Long[] ids);

}
